﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site1.Master"
    CodeBehind="list.aspx.vb" Inherits="project.list" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID"
        DataSourceID="SqlDataSource1" Width="555px" Height="176px" Style="margin-top: 28px"
        BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px"
        CellPadding="3" CellSpacing="2" AllowSorting="True">
        <Columns>
            <asp:BoundField DataField="ID" HeaderText="wineid" Visible="False" ReadOnly="True"
                SortExpression="wineid" />
            <asp:BoundField DataField="Brands" HeaderText="Brands" SortExpression="Brands" />
            <asp:BoundField DataField="colour" HeaderText="colour" SortExpression="colour" />
            <%-- <asp:ImageField DataImageUrlField="photo" HeaderText="photo">
                <ControlStyle Height="150px" Width="150px" />
            </asp:ImageField>
            <asp:HyperLinkField DataNavigateUrlFields="ID" 
                DataNavigateUrlFormatString="descriptin.aspx?id={0}" HeaderText="More Detail" 
                Text="More Detail" />--%>
            <asp:TemplateField HeaderStyle-Font-Underline="true">
                <ControlStyle Height="75px" Width="75" />
                <EditItemTemplate>
                    <asp:TextBox ID="tb1" runat="server" Text='<%#Eval("photo" )%>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:HyperLink ID="hpl1" runat ="server" NavigateUrl='<%#Eval("ID","descriptin.aspx?id={0}") %>'>
                    <asp:Image ID="photo" runat ="server"  ImageUrl='<%# Eval("photo") %>'  Height ="50px" Width ="50px"/>
                    </asp:HyperLink> 
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
        <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
        <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
        <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
        <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#FFF1D4" />
        <SortedAscendingHeaderStyle BackColor="#B95C30" />
        <SortedDescendingCellStyle BackColor="#F1E5CE" />
        <SortedDescendingHeaderStyle BackColor="#93451F" />
        
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT [ID], [colour], [ingredients], [price], [photo], [Brands], [Name] FROM [wined]">
    </asp:SqlDataSource>
</asp:Content>
